package com.eduhzy.ttw.commonsdk.entity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Date:2018/7/16
 * Time:15:46
 *
 * @author xubo
 */
public class ChooseSubjectData implements Parcelable {
    private String code;
    private String name;
    private String description;
    private boolean select;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public boolean isSelect() {
        return select;
    }

    public void setSelect(boolean select) {
        this.select = select;
    }

    public static Creator<ChooseSubjectData> getCREATOR() {
        return CREATOR;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.code);
        dest.writeString(this.name);
        dest.writeString(this.description);
        dest.writeByte(this.select ? (byte) 1 : (byte) 0);
    }

    public ChooseSubjectData() {
    }

    protected ChooseSubjectData(Parcel in) {
        this.code = in.readString();
        this.name = in.readString();
        this.description = in.readString();
        this.select = in.readByte() != 0;
    }

    public static final Parcelable.Creator<ChooseSubjectData> CREATOR = new Parcelable.Creator<ChooseSubjectData>() {
        @Override
        public ChooseSubjectData createFromParcel(Parcel source) {
            return new ChooseSubjectData(source);
        }

        @Override
        public ChooseSubjectData[] newArray(int size) {
            return new ChooseSubjectData[size];
        }
    };
}
